package com.yc.blog.springboot.mixview.ctr;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yc.blog.springboot.mixview.pojo.PersonVO;
/**
 * restful接口
 */
@Controller
public class DemoController3 {
	
	/**
	 * 返回字符串<p>
	 * @return
	 */
	@RequestMapping("/c3-1")
	@ResponseBody
	public String c1() {
		System.out.println("--------c3-1---------");
		
		return "success";
	}
	
	/**
	 * 接受json
	 * @param personVO
	 * @return
	 */
	@RequestMapping("/c3-2")
	@ResponseBody
	public String c2(@RequestBody PersonVO personVO) {
		System.out.println("--------c3-2---------name=" + personVO.getName());
		
		return "success";
	}
}
